<template>
  <div :class="['system-header', {'fixed': fixed}]">
    <div class="header-content">
      <router-link class="to-home" to="/">
        <img style="height:24px;" src="https://img.learun.cn/021/tm-logo-blue.png" >
        <span style="font-size:16px;" >力软VUE前端UI组件/版本:{{config.version}}</span>
      </router-link>
    </div>
  </div>
</template>

<script>
import config from '../../package.json'
export default {
  props: {
    fixed: {
      type: Boolean,
      default: true
    }
  },
  data(){
    return{
      config
    }
  }
}
</script>

<style lang="less">
@import '../style/size.less';

.system-header {
  width: 100%;
  height: @header-height;
  background-color: @header-bg-color;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px #f0f1f2;

  &.fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
  }

  .header-content {
    width: @page-width;
    position: relative;
    margin: 0 auto;
    height: 100%;
  }

  .to-home {
    display: flex;
    align-items: center;
    height: @header-height;
    padding-left: 16px;
    /*background-image: url(https://img.learun.cn/021/tm-logo-blue.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;*/
  }

  .header-nav {
    position: absolute;
    top: (@header-height - @header-nav-height) / 2;
    right: 10px;
    line-height: @header-nav-height;
    font-size: 16px;
    


    .nav-item {
      float: left;
      margin-right: 20px;

      a {
        color: inherit;
        text-decoration: none;
        display: inline-block;

        &:hover {
          color: @header-nav-color;
        }

        &.actived {
          color: @header-nav-color;
        }
      }

      &:last-child {
        margin-right: 0;
      }
    }
  }
}
</style>
